package psm.controller;

import javax.servlet.http.HttpServletRequest;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

import psm.model.userinfo;
import psm.service.psmService;

@Controller
@RequestMapping("/psmController")
public class psmController {

	private  psmService psmservice;

	public psmService getPsmservice() {
		return psmservice;
	}
	@Autowired
	public void setPsmservice(psmService psmservice) {
		this.psmservice = psmservice;
	}
	
	

	@RequestMapping("/showUser/{id}")
	public String showUser(@PathVariable String id, HttpServletRequest request) {
		userinfo u = psmservice.getAll("001");
		request.setAttribute("userinfo", u);
		return "showUser";
	}
	
}
